{extend name="default/base/base_member" /}
{block name="member_main"}




<div class="dsm-oredr-show">
    <div class="dsm-order-info">
        <div class="dsm-order-details">
            <div class="title">{$Think.lang.member_show_order_info}</div>
            <div class="content">
                <dl>
                    <dt>{$Think.lang.member_show_order_receiver}{$Think.lang.sc_colon}</dt>
                    <dd><span>{$order_info['extend_order_common']['reciver_name']}，</span><span>{$order_info['extend_order_common']['reciver_info']['phone']}，</span><span>{$order_info['extend_order_common']['reciver_info']['address']}</span></dd>
                </dl>
                <dl>
                    <dt>{$Think.lang.invoice_spaces}：</dt>
                    <dd>
                        {foreach name="$order_info.extend_order_common.invoice_info" item="value" key="key" }
                        <span title="{$key}">{$value}</span>
                        {/foreach}
                    </dd>
                </dl>
                <dl>
                    <dt>{$Think.lang.member_show_order_buyer_message}{$Think.lang.sc_colon}</dt>
                    <dd>{$order_info['extend_order_common']['order_message']}</dd>
                </dl>
                <dl class="line">
                    <dt>{$Think.lang.member_change_order_no}{$Think.lang.sc_colon}</dt>
                    <dd>{$order_info.order_sn}<a href="javascript:void(0);">{$Think.lang.sc_more}<i class="fa fa-angle-down"></i>
                        <div class="more"><span class="arrow"></span>
                            <ul>
                                {if $order_info.payment_name}
                                <li>{$Think.lang.sc_payment_method}{$Think.lang.sc_colon}<span>{$order_info.payment_name}
                                    <?php if($order_info['payment_code'] != 'offline' && !in_array($order_info['order_state'],array(ORDER_STATE_CANCEL,ORDER_STATE_NEW))) { ?>
                                    ({$Think.lang.order_number}{$Think.lang.sc_colon}{$order_info.pay_sn})
                                    <?php } ?>
                                                </span> </li>
                                {/if}
                                <li>{$Think.lang.order_time}{$Think.lang.sc_colon}<span>{$order_info.add_time|date="Y-m-d H:i:s",###}</span></li>
                                {if intval($order_info['payment_time'])}
                                <li>{$Think.lang.member_show_order_pay_time}{$Think.lang.sc_colon}<span>{$order_info.payment_time|date="Y-m-d H:i:s",###}</span></li>
                                {/if}
                                {if $order_info['extend_order_common']['shipping_time']}
                                <li>{$Think.lang.member_show_order_send_time}{$Think.lang.sc_colon}<span>{$order_info.extend_order_common.shipping_time|date="Y-m-d H:i:s",###}</span></li>
                                {/if}
                                {if intval($order_info['finnshed_time'])}
                                <li>{$Think.lang.member_show_order_finish_time}{$Think.lang.sc_colon}<span>{$order_info.finnshed_time|date="Y-m-d H:i:s",###}</span></li>
                                {/if}
                            </ul>
                        </div>
                    </a></dd>
                </dl>
            </div>
        </div>
        {if $order_info['order_state'] == ORDER_STATE_CANCEL}
        <div class="dsm-order-condition">
            <dl>
                <dt><i class="fa fa-power-off orange"></i>{$Think.lang.member_order_state}：</dt>
                <dd>{$Think.lang.ransaction_closed}</dd>
            </dl>
            <ul>
                <li>{$order_info['close_info']['log_role']} {$Think.lang.member_show_order_at} {$order_info.close_info.log_time|date="Y-m-d H:i:s",###} {$order_info.close_info.log_msg}</li>
            </ul>
        </div>
        {/if}
        {if $order_info['order_state'] == ORDER_STATE_NEW}
        <div class="dsm-order-condition">
            <dl>
                <dt><i class="fa fa-check-circle-o green"></i>{$Think.lang.member_order_state}：</dt>
                <dd>{$Think.lang.waiting_buyer_payment}</dd>
            </dl>
            <ul>
                <li>{$Think.lang.payment_prompt_1}<a href="{:url('Buy/pay',['pay_sn'=>$order_info.pay_sn])}" class="dsm-btn-mini dsm-btn-orange"><i></i>{$Think.lang.payment_prompt_2}</a>{$Think.lang.payment_prompt_3}</li>
                <li>{$Think.lang.payment_prompt_4}<a href="#order-step" class="dsm-btn-mini">{$Think.lang.member_order_cancel_order}</a>{$Think.lang.sc_handle}。</li>
                <li>{$Think.lang.payment_prompt_5}
                    <time>{$order_info.order_cancel_day|date="Y-m-d H:i:s",###}</time>
                    {$Think.lang.payment_prompt_6}</li>
            </ul>
        </div>
        {/if}
        {if $order_info['order_state'] == ORDER_STATE_PAY}
        <div class="dsm-order-condition">
            <dl>
                <dt><i class="fa fa-check-circle-o green"></i>{$Think.lang.member_order_state}：</dt>
                <dd>
                    {if $order_info['payment_code'] == 'offline'}{$Think.lang.wait_platform_shipment}{else/}{$Think.lang.paid_successfully}{/if}
                </dd>
            </dl>
            <ul>
                {if $order_info['payment_code'] == 'offline'}
                <li>{$Think.lang.payment_success_prompt1}</li>
                <li>{$Think.lang.payment_success_prompt2}</li>
                <li>{$Think.lang.payment_success_prompt3}<a href="#order-step" class="dsm-btn-mini">{$Think.lang.member_order_cancel_order}</a>{$Think.lang.sc_handle}。</li>
                {else/}
                <li>{$Think.lang.payment_success_prompt4}“{:get_order_payment_name($order_info['payment_code'])}”{$Think.lang.payment_success_prompt5}“{$order_info.pay_sn}”。</li>
                <li>{$Think.lang.payment_success_prompt6}</li>
                <li>{$Think.lang.payment_success_prompt7}<a class="dsm-btn-mini" href="#order-step">{$Think.lang.application_refund}</a>{$Think.lang.sc_handle}。</li>
                {/if}
            </ul>
        </div>
        {/if}
        {if $order_info['order_state'] == ORDER_STATE_SEND}
        <div class="dsm-order-condition">
            <dl>
                <dt><i class="fa fa-check-circle-o green"></i>{$Think.lang.member_order_state}：</dt>
                <dd>{$Think.lang.merchant_delivered}{if $order_info['extend_order_common']['dlyo_pickup_code'] != ''}， {$Think.lang.delivery_code}：{$order_info['extend_order_common']['dlyo_pickup_code']}{/if}</dd>
            </dl>
            <ul>
                <li>{$Think.lang.shipping_prompt_1}
                    {if $order_info.shipping_code != ''}
                    {$Think.lang.member_show_expre_company}：{$order_info['express_info']['express_name']}；{$Think.lang.single_number}：{$order_info.shipping_code}。
                    {if $order_info.if_deliver}
                    {$Think.lang.sc_view} <a href="#order-step" class="blue">“{$Think.lang.logistics_tracking}”</a> {$Think.lang.situation}。
                    {/if}
                    {else/}
                    {$Think.lang.no_need_logistics}
                    {/if}
                </li>
                <li>{$Think.lang.shipping_prompt_2}<a href="#order-step" class="dsm-btn-mini dsm-btn-green">{$Think.lang.member_order_ensure_order}</a>{$Think.lang.completion_transaction}</li>
                <li>{$Think.lang.shipping_prompt_3}
                    <time>{$order_info.order_confirm_day|date="Y-m-d H:i:s",###}</time>
                    {$Think.lang.shipping_prompt_4}</li>
            </ul>
        </div>
        {/if}
        {if $order_info['order_state'] == ORDER_STATE_SUCCESS}
        {if $order_info['evaluation_state'] == 1}
        <div class="dsm-order-condition">
            <dl>
                <dt><i class="fa fa-check-circle-o green"></i>{$Think.lang.member_order_state}：</dt>
                <dd>{$Think.lang.evaluation_complete}。</dd>
            </dl>
            <ul>
                <li>{$Think.lang.evaluation_prompt1}</li>
                <li>{$Think.lang.evaluation_prompt2}<a href="{:url('Memberfavorites/fglist')}" class="dsm-btn-mini">{$Think.lang.evaluation_prompt3}</a>{$Think.lang.evaluation_prompt4}</li>
            </ul>
        </div>
        {elseif $order_info['refund_state'] != 0}
        <div class="dsm-order-condition">
            <dl>
                <dt><i class="fa fa-check-circle-o green"></i>{$Think.lang.member_order_state}：</dt>
                <dd>{$Think.lang.have_refund}</dd>
            </dl>
            <ul>
                <li>{$Think.lang.interested}<a href="{:url('Memberfavorites/fglist')}" class="dsm-btn-mini">{$Think.lang.evaluation_prompt3}</a>{$Think.lang.evaluation_prompt4}。</li>
            </ul>
        </div>
        {else/}
        <div class="dsm-order-condition">
            <dl>
                <dt><i class="fa fa-check-circle-o green"></i>{$Think.lang.member_order_state}：</dt>
                <dd>{$Think.lang.have_goods}</dd>
            </dl>
            <ul>
                <li>{$Think.lang.after_information1}</li>
                <li>{$Think.lang.after_information2}<a href="#order-step" class="red">"{$Think.lang.complaints_rights}"</a>。</li>
                {if $order_info.if_evaluation}
                <li>{$Think.lang.after_information3}<a href="#order-step" class="dsm-btn-mini dsm-btn-acidblue">{$Think.lang.evaluation}</a>{$Think.lang.order_posting}。</li>
                {/if}
            </ul>
        </div>
        {/if}
        {/if}
        <div class="mall-msg">{$Think.lang.query}<a href="javascript:void(0);" onclick="ajax_form('mall_consult', '{$Think.lang.platform_customer_service}', '{:url('Membermallconsult/add_mallconsult',['inajax'=>'1'])}', 640);"><i class="fa fa-comments-o"></i>{$Think.lang.platform_customer_service}</a></div>
    </div>
    <table class="dsm-default-table order" style="margin-top: 15px">
        <thead>
        <tr>
            <th>投诉人：</th>
            <th>投诉内容：</th>
            <th>店家回复：</th>
        </tr>
        </thead>
        <tbody>
        {foreach name="complaint_list" item="val"}
        <tr>
            <td width="150">{$val.member_name}<br>{$val.consult_addtime|date='Y-m-d H:i:s',###}</td>
            <td>{$val.consult_content}</td>
            {if ($val.consult_reply)}
            <td>{$val.consult_reply}<br>{$val.consult_replytime|date='Y-m-d H:i:s',###}
            {else}
            <td>{$val.consult_reply}</td>
            {/if}
        </tr>
        {/foreach}
        </tbody>
    </table>
    <form action="{:url('memberordercomplaint/complaintAdd')}" method="post" class="margin-top-20">
        <!--投诉-->
        <div>
            <div>
                <div>
                    <textarea  class="textarea" name="content" placeholder="投诉内容" type="text" id="enter" ></textarea>
                    <!--投诉按钮-->
                    <div class="row hiddenblock" >
                        <label class="submit-border">
                            <input type="hidden" name="order_id" value="{$id.order_id}">
                            <input type="submit" class="submit" value="投诉">
                        </label>
                    </div>
                </div>
            </div>
        </div>
    </form>


    <script type="text/javascript">
        {if isset($order_info.express_info)}
        $(function(){
            $('#show_shipping').on('hover',function(){
                var_send = '{$order_info.extend_order_common.shipping_time|date="Y-m-d H:i:s",###}&nbsp;&nbsp;{$Think.lang.member_show_platform_has_send}<br/>';
                $.getJSON(HOMESITEURL+'/Memberorder/get_express.html?express_code={$order_info.express_info.express_code}&shipping_code={$order_info.shipping_code}&t={:random(7)}',function(data){
                    if(data){
                        data = var_send+data.join('<br/>');
                        $('#shipping_ul').html('<li>'+data+'</li>');
                        $('#show_shipping').unbind('hover');
                    }else{
                        $('#shipping_ul').html(var_send);
                        $('#show_shipping').unbind('hover');
                    }
                });
            });
        });
        {/if}
    </script>




    {/block}
